<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/warehouse/wareOutOrder/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>订单编号： <input size="25" placeholder="请输入订单编号" name="org2.onum" type="text" postField="onum" suggestFields="onum" suggestUrl="${pageContext.request.contextPath}/warehouse/wareOutOrder/getOutonum" lookupGroup="org2" value="${requestScope.dwzPageBean.countResultMap.onum}" />
					</td>
					<%-- <td><label style="width: 55px;">订单类型：</label>
						<select name="type" class="combox">
							<option value="">请选择</option>
							<option value="1" ${requestScope.dwzPageBean.countResultMap.type == 1?'selected':''}>出库</option>
							<option value="2" ${requestScope.dwzPageBean.countResultMap.type == 2?'selected':''}>入库</option>
						</select>
					</td> --%>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="/warehouse/wareOutOrder/export">
				<li><a href="${pageContext.request.contextPath}/warehouse/wareOutOrder/export" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?" class="icon"><span>导出EXCEL</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/warehouse/wareOutOrder/toImportExcel">
				<li><a class="icon" href="${pageContext.request.contextPath}/warehouse/wareOutOrder/toImportExcel" target="dialog" width="820" height="460" targetType="navTab" mask="true"><span>导入EXCEL</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/warehouse/wareOutOrder/toInsert">
				<li><a class="add" href="${pageContext.request.contextPath}/warehouse/wareOutOrder/toInsert" rel="insert" target="dialog" mask="true" width="820" height="460"><span>添加</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/warehouse/wareOutOrder/delete">
				<li><a class="delete" href="${pageContext.request.contextPath}/warehouse/wareOutOrder/delete" rel="id" target="selectedTodo" title="确定要删除吗？" warn="请最小选择一条记录" mask="true"><span>批量删除</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
				<th orderField="onum" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'onum'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单编号</th>
				<th orderField="opcs" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'opcs'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单金额</th>
				<th orderField="type" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'type'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单类型</th>
				<th orderField="odtm" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'odtm'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单时间</th>
				<th width="220">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr   ondblclick="openDetails(this)" target="navTab" href="${pageContext.request.contextPath}/warehouse/wareInoutOrderDetails/list?ioid=${record.id}&str=out" title="订单详情">
						<td><input name="id" value="${record.id}" type="checkbox"></td>
						<td>${record.onum}</td>
						<%-- <td>${record.opcs}</td> --%>
						<td><nf:nfmt num="${record.opcs}"/></td>
						<td>${record.type == 1?'出库':''}${record.type == 2?'入库':''}</td>
						<td><fmt:formatDate value="${record.odtm}"  pattern='yyyy-MM-dd HH:mm:ss'/></td>
						<td><shiro:hasPermission name="/warehouse/wareOutOrder/details">
								<a title="订单详情" target="navTab" rel="${pageContext.request.contextPath}/warehouse/wareOutOrder/details" href="${pageContext.request.contextPath}/warehouse/wareOutOrder/details?ioid=${record.id}&str=out" class="detailsBtn" mask="true"><span>订单详情</span></a>
							</shiro:hasPermission> <shiro:hasPermission name="/warehouse/wareOutOrder/toUpdate">
								<a title="编辑" target="dialog" href="${pageContext.request.contextPath}/warehouse/wareOutOrder/toUpdate?id=${record.id}" class="editBtn" mask="true" width="820" height="460"><span>编辑</span></a>
							</shiro:hasPermission> <shiro:hasPermission name="/warehouse/wareOutOrder/delete">
								<a title="确定要删除吗？" mask="true" target="ajaxTodo" href="${pageContext.request.contextPath}/warehouse/wareOutOrder/delete?id=${record.id}" class="deleteBtn" mask="true"><span>删除</span></a>
							</shiro:hasPermission></td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>